import {legacy_createStore as createStore} from 'redux'
/*
    编写计数器的reduce
*/
const counterReduce=(state=10,action)=>{
    switch(action.type){
        case 'addition':
            return state+1
        case 'subtraction':
            return state-1
        default:
            return state
    }
}
const store=createStore(counterReduce)
export default store